package com.jeesite.modules.app.examinate.extheory.service;

import java.util.List;

import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.jeesite.common.service.TreeService;
import com.jeesite.modules.app.examinate.extheory.dao.AppExaminationBarbecueDao;
import com.jeesite.modules.app.examinate.extheory.entity.AppExaminationBarbecue;
import com.jeesite.modules.file.utils.FileUploadUtils;

@Service
@Transactional(readOnly=true)
public class AppExaminationBarbecueService extends TreeService<AppExaminationBarbecueDao, AppExaminationBarbecue>{
	/**
	 * 获取单条数据
	 * @param texaminationBarbecue
	 * @return
	 */
	@Override
	public AppExaminationBarbecue get(AppExaminationBarbecue texaminationBarbecue) {
		return super.get(texaminationBarbecue);
	}
	
	/**
	 * 查询列表数据
	 * @param texaminationBarbecue
	 * @return
	 */
	@Override
	public List<AppExaminationBarbecue> findList(AppExaminationBarbecue texaminationBarbecue) {
		return super.findList(texaminationBarbecue);
	}
	
	/**
	 * 保存数据（插入或更新）
	 * @param texaminationBarbecue
	 */
	@Override
	@Transactional(readOnly=false)
	public void save(AppExaminationBarbecue texaminationBarbecue) {
		super.save(texaminationBarbecue);
		// 保存上传图片
		FileUploadUtils.saveFileUpload(texaminationBarbecue.getId(), "texaminationBarbecue_image");
		// 保存上传附件
		FileUploadUtils.saveFileUpload(texaminationBarbecue.getId(), "texaminationBarbecue_file");
	}
	
	/**
	 * 更新状态
	 * @param texaminationBarbecue
	 */
	@Override
	@Transactional(readOnly=false)
	public void updateStatus(AppExaminationBarbecue texaminationBarbecue) {
		super.updateStatus(texaminationBarbecue);
	}
	
	/**
	 * 删除数据
	 * @param texaminationBarbecue
	 */
	@Override
	@Transactional(readOnly=false)
	public void delete(AppExaminationBarbecue texaminationBarbecue) {
		super.delete(texaminationBarbecue);
	}
}
